package com.java.star.mall.front.pojo.param;

import com.java.star.mall.common.constant.web.PageConstant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 订单查询参数
 */
@Data
public class OrderQueryParam implements Serializable {

    private static final long serialVersionUID = 5251914862518815464L;

    @ApiModelProperty(value = "订单状态", notes = "1待付款，2待发货，3已发货，4已完成，5已评价，6已关闭")
    @Pattern(regexp = "^[1-6]$", message = "订单状态错误")
    private String status;

    @ApiModelProperty(value = "当前页")
    private Integer page = Integer.parseInt(PageConstant.DEFAULT_PAGE);

    @ApiModelProperty(value = "每页记录数")
    private Integer pageSize = Integer.parseInt(PageConstant.DEFAULT_PAGE_SIZE);
}
